package com.xiaoluo.a16_keycode;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;

import androidx.annotation.Nullable;

/**
 * @ Created on: 2020/10/16
 * @Author: LEGION XiaoLuo
 * @ Description:
 */
public class KeyCodeView extends View {


    public KeyCodeView(Context context) {
        super(context);
    }

    public KeyCodeView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public KeyCodeView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean dispatchKeyEvent(KeyEvent event) {
        Log.i("xlj", " keycode dispatchKeyEvent: event = " + event.getKeyCode());
        return super.dispatchKeyEvent(event);
    }
}
